<template>
  <div id="app">
    <div class="app-layout">
      <NavBar></NavBar>
      <TransitionFade>
        <router-view />
      </TransitionFade>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { windowModule } from '@/store/index'
import NavBar from '@/components/NavBar.vue'

@Component({
  components: {
    NavBar
  }
})
export default class App extends Vue {
  private isShowNav: boolean = true

  mounted() {
    window.addEventListener('resize', windowModule.SetSize)
  }

  destroy() {
    window.removeEventListener('resize', windowModule.SetSize)
  }
}
</script>

<style lang="scss">
@import '@/styles/general.scss';
body {
  margin: 0;
}

#app {
  margin: 0 auto;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: 1rem 0 2rem;
  width: 80vw;
  /* background-color: #66d610; */

  @media screen and (max-width: $size-lg) {
    width: 80vw;
  }
  @media screen and (max-width: $size-md) {
    width: 85vw;
  }
  @media screen and (max-width: $size-sm) {
    width: 90vw;
  }
  @media screen and (max-width: $size-xs) {
    width: 95vw;
  }
}
</style>
